package com.project.base.timer;


import org.quartz.*;


/**
 * @author yuanchi
 * @ClassName: CommonJob
 * @Description: TODO
 * @date 2017年1月17日 上午11:18:04
 */

@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public abstract class CommonJob implements Job {
    public void execute(JobExecutionContext context)
            throws JobExecutionException {
        String param = (String) context.getJobDetail().getJobDataMap()
                .get("param");

        runJob(context, param);
    }

    public abstract void runJob(JobExecutionContext context, String parameter);
}
